Keywords
Flow-Wing programming language supports the following keywords, grouped by category:
Types
| Keyword | Description | Docs |
|---|---|---|
int | 32-bit integer type | Data Types |
int8 | 8-bit integer type | Data Types |
int64 | 64-bit integer type | Data Types |
str | String type | Data Types |
char | Character type (single Unicode character) | Data Types |
deci | Decimal type (64-bit) | Data Types |
deci32 | 32-bit decimal type | Data Types |
bool | Boolean type | Data Types |
nthg | Represents 'nothing' or 'void' | Data Types |
unknown | Represents an unknown type | Data Types |
Literal Values
| Keyword | Description | Docs |
|---|---|---|
true | Boolean true value | Data Types |
false | Boolean false value | Data Types |
null | Null value; type of the null literal | Data Types |
Control Flow
| Keyword | Description | Docs |
|---|---|---|
if | Conditional statement | Or if else Statement |
or | Logical OR operator / alternative if branch | Or if else Statement |
else | Alternative branch in conditional statement | Or if else Statement |
switch | Switch statement | Switch Statement |
case | Case in a switch statement | Switch Statement |
default | Default case in a switch statement | Switch Statement |
Loops
| Keyword | Description | Docs |
|---|---|---|
while | Looping statement | While Loop |
for | Looping statement | For Loop |
to | Used in range expressions | For Loop |
continue | Skip to the next iteration in a loop | While Loop |
break | Exit from a loop | While Loop |
Declarations
| Keyword | Description | Docs |
|---|---|---|
var | Variable declaration | Variables and Constants |
const | Constant declaration | Variables and Constants |
fun | Function declaration | Declare and Define Functions |
class | Class declaration | Class |
type | Define a custom type | Custom Types and Objects |
decl | Forward-declare a type/function | Declare and Define Functions |
return | Return a value from a function | Declare and Define Functions |
Modules & Imports
| Keyword | Description | Docs |
|---|---|---|
bring | Import a module or file | Bring Import Exports |
expose | Expose functionality of a module | Bring Import Exports |
from | Used in import statements | Bring Import Exports |
module | Module declaration | Creating and Using Modules |
Object-Oriented
| Keyword | Description | Docs |
|---|---|---|
new | Instantiate a class or object | Class |
extends | Inherit from a superclass | Inheritance |
inout | Parameter passing mode | Declare and Define Functions |
as | Type casting or aliasing | Data Types |
Other
| Keyword | Description | Docs |
|---|---|---|
fill | Fill a data structure | Fill Expression |